﻿import java.util.Scanner;

public class HomeWork {

	public static void main(String[] args) {
		int count = 0;
		String answer;
		Scanner input = new Scanner(System.in);
		for (int i = 1; i <= 5 ; i++) {
			System.out.println("第"+i+"家专卖店:");
			for (int j = 1; j <= 3; j++) {
				System.out.print("离开么？(y/n)");
				answer = input.next();
				if("y".equals(answer)){
					break;
				}
				System.out.println("您买了一件衣服！");
				count++;
			}
			System.out.println("结账！");
		}
		System.out.println("总共买了"+count+"件衣服！");
	}
}